package com.myqm.service.impl.weixin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.myqm.service.weixin.CustomerService;
import com.myqm.dao.weixin.CustomerDao;
import com.myqm.pojo.weixin.Customer;
import com.myqm.pojo.weixin.query.QueryCar;
import com.myqm.pojo.weixin.query.QueryCustomer;
import com.myqm.service.weixin.CustomerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Service
public class CustomerServiceImpl implements CustomerService{

	@Autowired
	public CustomerDao Customerdao;
	@Override
	public int delById(Integer id) {
		return Customerdao.delById(id);
	}

	@Override
	public int save(Customer record) {
		return Customerdao.save(record);
	}

	@Override
	public Customer getById(Integer id) {
		return Customerdao.getById(id);
	}


	@Override
	public int editById(Customer record) {
		return Customerdao.editById(record);
	}
	
 


	@Override
	public PageInfo<Customer> list(int pagenum, int pagesize,QueryCustomer param) {
		PageHelper.startPage(pagenum, pagesize);
		List<Customer> datalist = Customerdao.list(param);
			 
		PageInfo<Customer> p = new PageInfo<Customer>(datalist);
		return p;
	}

}
